package com.ruoyi.project.shortUrl.url.domain;

import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import com.ruoyi.framework.aspectj.lang.annotation.Excel;
import com.ruoyi.framework.web.domain.BaseEntity;

/**
 * 短链接对象 short_url
 * 
 * @author ruoyi
 * @date 2020-03-29
 */
public class ShortUrl extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 短链接编号 */
    private String shortCode;

    /** 主要域名 */
    @Excel(name = "主要域名")
    private String mainDomain;

    /** 目标地址 */
    @Excel(name = "目标地址")
    private String targetUrl;

    /** 创建时间 */
    @Excel(name = "创建时间")
    private Long created;

    /** 修改时间 */
    @Excel(name = "修改时间")
    private Long modified;

    /** 创建人id */
    @Excel(name = "创建人id")
    private String createUserId;
    
    /** 过期时间 */
    @Excel(name = "过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private String expirationTime;
    
    /** 密码 */
    private String editPassword;
    
    /**
     * 用于搜索，对createUserId和createBy两个字段有效
     */
    private String userLike;
    
    /**
     * 用于搜索targetUrl
     */
    private String targetLike;
    
    private String openWay;

    public void setShortCode(String shortCode) 
    {
        this.shortCode = shortCode;
    }

    public String getShortCode() 
    {
        return shortCode;
    }
    public void setMainDomain(String mainDomain) 
    {
        this.mainDomain = mainDomain;
    }

    public String getMainDomain() 
    {
        return mainDomain;
    }
    public void setTargetUrl(String targetUrl) 
    {
        this.targetUrl = targetUrl;
    }

    public String getTargetUrl() 
    {
        return targetUrl;
    }
    public void setCreated(Long created) 
    {
        this.created = created;
    }

    public Long getCreated() 
    {
        return created;
    }
    public void setModified(Long modified) 
    {
        this.modified = modified;
    }

    public Long getModified() 
    {
        return modified;
    }
    public void setCreateUserId(String createUserId) 
    {
        this.createUserId = createUserId;
    }

    public String getCreateUserId() 
    {
        return createUserId;
    }

    public void setExpirationTime(String expirationTime) 
    {
        this.expirationTime = expirationTime;
    }

    public String getExpirationTime() 
    {
        return expirationTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("shortCode", getShortCode())
            .append("mainDomain", getMainDomain())
            .append("targetUrl", getTargetUrl())
            .append("created", getCreated())
            .append("modified", getModified())
            .append("createUserId", getCreateUserId())
            .append("createBy", getCreateBy())
            .append("expirationTime", getExpirationTime())
            .toString();
    }

	public String getUserLike() {
		return userLike;
	}

	public void setUserLike(String userLike) {
		this.userLike = userLike;
	}

	public String getTargetLike() {
		return targetLike;
	}

	public void setTargetLike(String targetLike) {
		this.targetLike = targetLike;
	}

	public String getEditPassword() {
		return editPassword;
	}

	public void setEditPassword(String editPassword) {
		this.editPassword = editPassword;
	}

	public String getOpenWay() {
		return openWay;
	}

	public void setOpenWay(String openWay) {
		this.openWay = openWay;
	}
}
